package com.itheima.reggie.common;


import com.itheima.reggie.domain.Employee;

//ThreadLocal操作工具类
public class EmployeeHolder {
    //维护ThreadLocal对象
    private static ThreadLocal<Employee> threadLocal = new ThreadLocal<>();

    //放入user
    public static void set(Employee employee){
        threadLocal.set(employee);
    }
    //获取User
    public static Employee get(){
        return threadLocal.get();
    }
    //移除
    public static void remove(){
        threadLocal.remove();
    }
}
